package com.vhukze.basics.exception;

import com.vhukze.basics.enumeration.RespCodeEnum;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class MyException extends RuntimeException {
    private RespCodeEnum respCodeEnum;
    private String msg;
    private int code;

    public MyException(RespCodeEnum respCodeEnum) {
        super(respCodeEnum.getMessage());
        this.respCodeEnum = respCodeEnum;
    }

    public MyException(int code, String msg) {
        super(msg);
        this.msg = msg;
        this.code = code;
    }

}
